home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 39
/
Aminet 39 (2000)(Schatztruhe)[!][Oct 2000].iso
/
Aminet
/
mus
/
play
/
DelfMPEG.lha
/
DelfMPEG
/
DelfMPEG.readme
< prev
Wrap
Text File
|
2000-07-27
|
13KB
|
271 lines
Short: MPEG audio player for Delfina DSP
Author: Smack/Infect! (Michael Henke)
Type: mus/play
$VER: DelfMPEG 0.6 (Thu 27-Jul-2000)
#features
-plays MPEG audio files with almost no CPU load
(decoding is done completely by Delfina's DSP56002)
-currently supports MPEG1 layer II and III
-NEW: ARexx interface
(full 'remote control' capability)
-multi-stage buffering system
(for smooth playback while loading from disk)
-free software (full source code included, of course)
#requirements
-CPU 68020+
-AmigaOS V37+
-Delfina DSP board
-asyncio.library V39+
-developed on: A1200 (68030+882 @ 40MHz, 16MB Fast, Delfina1200 DSP)
-tested on: various machines with Delfina1200, Delfina Lite or Plus
#recommended
-reqtools.library V38+
-latest version of delfina.library
(currently 4.14, see also 'known problems' section)
-some MPEG audio files :)
#changes since previous release
-fixed a bug in the RIFF header recognition
-implemented ARexx interface (AREXX/S option added)
#how to use it
DelfMPEG is a shell-only program. These options can be used:
FILES specify one or more filenames.
if omitted a reqtools file requester appears.
AREXX activate ARexx mode.
please read the file 'arexx.txt' for details.
there are several example scripts provided in the 'rexx'
sub-directory which can also be used to integrate DelfMPEG
in tools like DOpus for instance, that's really easy now!
VERBOSE / -v output more information.
NOPLAY / -n don't play but just output some information.
this works also without a Delfina board.
SHOWTAG / -t display ID3v1 tag before playing.
this is some extra information that can be appended to
MPEG audio files. (title, artist etc.)
MONO / -m decode only the left channel of stereo files.
this option obviously degrades playback quality but it
also saves quite a lot DSP processing time.
DACRATE / -d <number> (default: 0)
set Delfina's codec rate to a fixed value (in kHz).
this option allows to save some DSP power by lowering
the DAC (Digital/Analog-Converter) rate, but playing the
sound at a lower rate degrades quality, of course.
the default value of 0 (zero) means "best quality", i.e.
DAC rate will be optimal for the files to play.
the given value is automatically rounded to the nearest
available Delfina rate: 16, 27, 32 or 48 kHz.
(12, 24, 36 or 48 kHz for Delfina 1200 and Plus)
VOLUME / -vol <number> (default: 100)
set the playback volume (in per cent, range 0...200).
warning: if the volume is boosted (101...200) there might
be distortions due to output clipping.
FRAMEBUF / -f <number> (default: 100)
set the number of read-ahead frame buffers.
the frame buffers don't make the file reader faster but
instead it becomes more "reliable". it works just like
the "anti-shock" feature of portable CD players: if the
reading process gets interrupted for a short period then
DelfMPEG continues playing data that's already buffered.
ASYNCBUF / -a <number> (default: 128)
set the size of the AsyncIO buffer (in Kbytes).
large IO-buffers usually improve the performance of the
file reader but they also increase access time, which is
the reason for the delay caused by the SHOWTAG option.
FFSKIP / -ff <number> (default: 10)
set the number of frames that are skipped during fast
forward mode. (higher number = faster seeking)
NOFASTL / -nl don't use internal DSP memory (L-data or Program memory)
NOFASTP / -np for the decoding routines. these options are not really
useful except maybe for benchmark or debug purposes, they
cause a significant slowdown of the decoder!
NOTIMER / -nt don't output the position timer during playback.
you should specify this option if you use DelfMPEG to play
some background music while using other programs.
(pulldown-menus, drag'n'drop etc. will block the timer
output thus also delaying the file reader)
STRICT / -s don't try to resync in case of read error.
from version 0.4 on DelfMPEG's file reader can tolerate
defective MPEG audio files: if it encounters invalid or
non-audio data it continues reading in order to find the
next valid frame header (resynchronize with the stream).
but this behavior could cause problems in some rare cases
(noise or even crash the decoder) so that's why it can be
switched off with this option.
During playback these keys can be used:
Ctrl-F fast forward
Ctrl-E pause/continue
Ctrl-C stop current file, start next file
Ctrl-D quit program
#technical stuff
-MPEG audio files are made of frames. Each frame is independend from the
other frames and contains all data that's necessary to decode it (an
exception to this rule is the "bit reservoir" feature of layer III which
allows the encoder to spread data over several consecutive frames).
In MPEG1 layer II or III files every frame contains 1152 raw samples, so
the number of frames per second depends on the sampling rate (one second
of 44100 Hz sound consumes more than 38 frames). The bit rate determines
the size of the frames in bytes (or bits respectively).
In theory all frame parameters can change from one frame to the next.
DelfMPEG supports changes of these parameters inside a file:
+bit rate (some encoders can produce "variable bit rate" files)
+stereo <-> joint-stereo (Pegase uses this "dynamic joint-stereo" mode)
+error protection (it's currently ignored anyway)
For some technical reasons DelfMPEG does NOT support files which contain
changes of these parameters:
-MPEG layer
-number of channels (mono <-> stereo)
-sampling rate
But I think this is not a big restriction in everyday life.
Note: the file information that is displayed before playing is taken from
the first frame only and the duration is just a "guess" based on it.
-here are a few benchmark results, taken on my A1200 using the "beta 46"
version of delfina.library 4.15 (DSP load measured with DelfLoad)
"Delfina 1200: delfina.library v4.15, 31 K memory, 73.7 MHz DSP"
DSP load in idle state: 13%
DSP load during playback - layer II 128kbps 44100Hz j-stereo
normal (no options): 45% (full quality)
with NOFASTL and NOFASTP options: 66% (full quality)
with MONO option: 35% (degraded quality)
with DACRATE=24 option: 38% (degraded quality)
DSP load during playback - layer III 128kbps 44100Hz j-stereo
normal (no options): 52% (full quality)
with NOFASTL and NOFASTP options: 76% (full quality)
with MONO option: 38% (degraded quality)
with DACRATE=24 option: 44% (degraded quality)
conclusions:
-the 74 MHz DSP of the new Delfina models (1200 and Plus) offers more
than enough power for realtime decoding in all these situations.
(even 40 MHz are sufficient for mp3 playback - hello Lite users!)
-notice the big difference between the "normal" and "NOFAST" results!
the use of some internal DSP memory in the critical subroutines gives
a significant speedup. (an important area for DSP code optimizations)
-the MONO option does not exactly halve the effective DSP load. this is
because not all decoding steps can be skipped for the omitted channel,
real single-channel files require less processing.
-in VERBOSE mode DelfMPEG could print a few warnings:
-NO_INPUT_DATA means that the file reader could not supply the decoder
with new data in time (results in "stretched" sound, you can test this
by blocking the position timer output - and also the file reader)
-DECODER_BUSY means that the DSP decoding routine did not finish in time
before the next call (results in "jerky" or "stuttering" sound, can be
tested by using the mp3 decoder on a slow DSP;)
-MP3_MAINDATA_ERROR means that the layer III file contained corrupted
data (if you encounter this warning please check the mp3 file using
another player (such as MPEGA), if the file is really damaged then all
decoders should complain about it)
#known problems
-DelfMPEG only recognizes MPEG1 audio files.
not supported: MPEG2 or mixed audio/video files.
-some mp3 files are not played correctly! what's wrong with DelfMPEG?
1) DSP load approaches or exceeds the 100% limit on slow Delfinas.
symptom: audible "drop-outs", DECODER_BUSY warning in VERBOSE mode.
actions: use MONO or DACRATE options to reduce DSP load (and quality)
or overclock your Delfina Lite (some guys have done this and
they live a happier life now;) or purchase a Delfina Plus.
2) intensity stereo decoding is not implemented yet.
symptom: audible distortions, INTENSITY_STEREO warning in VERBOSE mode.
actions: send me gifts, money or at least some nice emails and give me
the motivation to implement this. :-)
please consider: in my large collection of mp3's there are
only two files that are encoded with this scheme. high
quality encoders (use LAME, it's the best!) don't use the
intensity stereo scheme at all!
3) in VERBOSE mode an "unexpected EOF" error is reported for some files.
symptom: just the error message.
actions: this is a minor glitch in the file reader, it shouldn't have
any audible effects. that's why I decided to ignore it, you
can try and convince me to fix it. :-)
-DelfMPEG causes deadlocks/crashes.
1) delfina.library 4.14 - the "fake crash" bug
symptom: soon after DelfMPEG started playing the "Delfina crashed"
requester appears; DelfLoad display jumps to 100%.
actions: wait for Petsoff to release a fixed delfina.library.
ignore the "Delfina crashed" requester (that's right, do not
reply it while DelfMPEG is playing).
or you could use an older version of delfina.library (4.13 or
lower) - not recommended, there seem to be other problems.
2) delfina.library 4.14 and lower - the "AHI killer" bug
symptom: AHI and DelfAIFF crash if used after DelfMPEG. the system
freezes and must be rebooted.
actions: wait for Petsoff to release a fixed delfina.library.
use the NOFASTP option of DelfMPEG, it avoids the bug but it
also slows down the decoder!
or use the workaround: quit DelfMPEG and all other Delfina
programs, use "avail flush" to remove delfina.library from
memory and then start your AHI programs.
#acknowledgements
DelfMPEG uses ideas/code from:
-MPEG Audio Layer II decoder by Fredrik Noring and Tomas Berndtsson
(an mp2 player for Atari Falcon, DSP56K code)
-amp11 by Niklas Beisert (clean and fast C++ code)
-FalcAMP by Denis "STGhost" Huguet and David "Splash" Carrere
(an mp3 player for Atari Falcon, DSP56K code)
-reference code by MPEG Software Simulation Group ("the original" C code)
#author
mailto: smack@smack.de
DelfMPEG - MPEG audio player for Delfina DSP
Copyright (C) 1999, 2000 Michael Henke
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA